package com.restaurant.application.reservation;

import com.nebutown.base.Unit;
import com.restaurant.application.indexes.reservationlist.mysql.ReservationListFromreservationUidIF;
import com.restaurant.application.minifacade.data.ReservationPageBO;
import com.restaurant.application.reservation.support.ReservationData;

/**
 * 预约基元
 *
 * @author Administrator
 */
public interface Reservation extends Unit, ReservationListFromreservationUidIF {

    String R = "R";
    String STATE_START = "待联系";
    String STATE_CANCEL = "已取消";
    String STATE_ACCEPT = "已接受";
    String STATE_REFUSE = "已拒绝";

    /**
     * 创建一条预约（立即预约）
     *
     * @param data ReservationData
     * @return success 成功， other 失败
     */
    String init(ReservationData data);

    /**
     * 更新预约。
     *
     * @param data ReservationData
     * @return success 成功， other 失败
     */
    String update(ReservationData data);

    /**
     * 取消预约
     *
     * @return success 成功， other 失败
     */
    String cancel();

    /**
     * 小程序端获取预约详情
     *
     * @return ReservationBean
     */
    ReservationPageBO getReservationBean();
}
